Skip to content

feat(legalizer): add GlobalISel-like legalization framework - #1234

Draft
naveen-seth wants to merge 1 commit into
opencompl:mainfrom
naveen-seth:legalizer-infrastructure
Draft

feat(legalizer): add GlobalISel-like legalization framework#1234
naveen-seth wants to merge 1 commit into
opencompl:mainfrom
naveen-seth:legalizer-infrastructure

Conversation

@naveen-seth

@naveen-seth naveen-seth commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

This is how we could structure our legalization passes to somewhat match LLVM’s GlobalISel approach.
For now, it defines the rule actions needed for G_ADD/G_SUB in the 64-bit RISC-V legalization pass.

WIP, draft opened for Thursday's meeting.

The code surrounding typeIndex has no real use yet, but should make more sense as we add more rules.
The current top-level documentation is mostly copied from LLVM.

@naveen-seth
naveen-seth force-pushed the legalizer-infrastructure branch 3 times, most recently from c1656e0 to 7adef31 Compare August 12, 2026 23:06
This adds the basic framework for building legalization passes in the same way
as LLVM's GlobalISel. This currently just defines the rule actions needed for
G_ADD/G_SUB in the 64-bit RISC-V legalization pass.

(Very WIP. Top-level documentation is mostly just copied from LLVM.)
@naveen-seth
naveen-seth force-pushed the legalizer-infrastructure branch from 7adef31 to 11015e1 Compare August 13, 2026 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant